<section class="ourteam" id="ourteam">
    <div class="container">



      <div class="heading">
        <?php  isset(qvaCore::$qvaOptions['ourteam']['title']) && !empty(qvaCore::$qvaOptions['ourteam']['title']) ?   printf(__(stripslashes('<h2>%s</h2>'), QVA_LANG), qvaCore::$qvaOptions['ourteam']['title'])  : "";?>
        <?php  isset(qvaCore::$qvaOptions['ourteam']['short_description']) && !empty(qvaCore::$qvaOptions['ourteam']['short_description']) ?  printf(__(stripslashes('<h3>%s</h3>'), QVA_LANG), qvaCore::$qvaOptions['ourteam']['short_description'])  : "";?>
        <?php  isset(qvaCore::$qvaOptions['ourteam']['description']) && !empty(qvaCore::$qvaOptions['ourteam']['description']) ?   printf(__(stripslashes('<p>%s</p>'), QVA_LANG), qvaCore::$qvaOptions['ourteam']['description'])  : "";?>
      </div>
      
      <?php 
        $qva_getOurteam = get_posts( array("post_type"=>"qva_ourteam", "posts_per_page"=>-1, "post_status"=>"publish") );

        if ( !empty($qva_getOurteam) && !is_wp_error($qva_getOurteam) ) : 
      ?>
          <div class="row box">
      <?php  foreach ($qva_getOurteam as $ourteam) : setup_postdata($ourteam); 
                $qva_metaData = get_post_meta($ourteam->ID, 'qva_ourteam', true);
               
                $qva_metaData = isset($qva_metaData['ourteam']) && !empty($qva_metaData['ourteam']) ? $qva_metaData['ourteam'] : null;

                if ( !empty($qva_metaData) )  :

      ?>

              <div class=" col-lg-4 col-md-4 col-sm-4 col-xs-12 member"> 
                
                <?php if (isset($qva_metaData['photo']) && !empty($qva_metaData['photo'])) : ?>
                <span class="round">
                  <img src="<?php echo $qva_metaData['photo']; ?>"  alt="<?php echo get_the_title($ourteam->ID) ?>">
                </span>
                <?php endif; ?>

                <?php 
                   if (isset($ourteam->post_title)) : echo '<h3 class="membername">'; printf(__('%s', QVA_LANG), $ourteam->post_title) ; echo '</h3>'; endif; 
                ?> 
             
                <?php 
                     if ( isset($qva_metaData['position']) ) : echo  '<p class="jobrole">' ; printf(__(stripslashes('%s'), QVA_LANG), $qva_metaData['position']); echo  '</p>'; endif; 
                ?>

                <?php 
                     isset($qva_metaData['introduction']) ?   printf(__(stripslashes('<p>%s</p>'), QVA_LANG), $qva_metaData['introduction']) : ''; 
                ?>

                <?php if ( isset($qva_metaData['social_icon']) && !empty($qva_metaData['social_icon']) ) : ?> 
                <ul class="memberLink">
                  <?php foreach ( $qva_metaData['social_icon'] as $k => $socialIcon ) : ?>
                  <li><a href="<?php echo isset($qva_metaData['social_link'][$k]) ? esc_url($qva_metaData['social_link'][$k]) : ""; ?>"><i class="<?php echo $socialIcon; ?>"></i></a></li>
                  <?php endforeach; ?>
                </ul>
                <?php endif; ?>
              </div>

            <?php endif; ?>
          
    <?php   endforeach;wp_reset_postdata(); ?>
        </div>
    <?php 
      endif; // end check empty 
    ?>
    </div>
</section>
